/*
 * @(#)NodeFigure.java  1.0  July 4, 2006
 *
 * Copyright (c) 1996-2006 by the original authors of JHotDraw
 * and all its contributors ("JHotDraw.org")
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of
 * JHotDraw.org ("Confidential Information"). You shall not disclose
 * such Confidential Information and shall use it only in accordance
 * with the terms of the license agreement you entered into with
 * JHotDraw.org.
 *
 * Original code copyright JHotDraw:
 * Project:		JHotdraw - a GUI framework for technical drawings
 *				http://www.jhotdraw.org
 *				http://jhotdraw.sourceforge.net
 * Copyright:	(c) by the original author(s) and all contributors
 * License:		Lesser GNU Public License (LGPL)
 *				http://www.opensource.org/licenses/lgpl-license.html
 */

package cb.tools;

import java.awt.*;
import java.awt.geom.*;
import java.util.*;
import org.jhotdraw.draw.*;
import org.jhotdraw.geom.*;
import static org.jhotdraw.draw.AttributeKeys.*;
import org.jhotdraw.util.*;

public class JunctionFigure extends RectangleFigure
	{
		private LinkedList<AbstractConnector> connectors;
		private static LocatorConnector west;

		/** Creates a new instance. */
		public JunctionFigure()
			{
				super();
			}
		
		  public void basicSetBounds(Point2D.Double anchor, Point2D.Double lead) {
		        rectangle.x = Math.min(anchor.x, lead.x);
		        rectangle.y = Math.min(anchor.y , lead.y);
		        rectangle.width = 5;
		        rectangle.height = 5;
		    }
		    /**
		     * Moves the Figure to a new location.
		     * @param tx the transformation matrix.
		     */
		    public void basicTransform(AffineTransform tx) {
		        Point2D.Double anchor = getStartPoint();
		        Point2D.Double lead = getEndPoint();
		        basicSetBounds(
		                (Point2D.Double) tx.transform(anchor, anchor),
		                (Point2D.Double) tx.transform(lead, lead)
		                );
		    }

	}
